package com.su.lightthings.utils

import android.os.Environment
import com.jieli.jl_bt_ota.constant.BluetoothConstant
import com.su.lightthings.R
import com.su.lightthings.bean.AboutPageBean
import com.su.lightthings.bean.HomeFunctionBean
import com.su.lightthings.bean.ScanDeviceBean
import com.su.lightthings.bean.SportPageItemBean
import com.su.lightthings.bean.WatchFunctionBean
import java.util.Locale
import java.util.UUID

class Cons {

    /**
     * 通用
     */
    object Common {
        const val SUCCESS = "success"
        const val TIME_STAMP = "timeStamp"

        //        val DefaultUserInfo = UserInfoBean(0, "Storm", 0, 0, 0, 0)
//        val userAvatarIcon = arrayListOf<Int>(
//            R.drawable.avatar_man,
//            R.drawable.avatar_female,
//        )
        const val OTA_FILE_DIR_NAME = "SmartWatchOta"
        const val OTA_FREQ_128_80_FILE_NAME = "FreqOta-128-80.bin"
        const val APP_UPDATE_FILE_DIR_NAME = "SmartWatchUpdate"
        const val APP_UPDATE_FILE_APK_NAME = "update.apk"
        const val CROP_FILE_DIR_NAME = "SmartWatchOta"
        const val CROP_FILE_NAME = "uCrop.jpg"
        const val TEMP_CROP_FILE_NAME = "temp_uCrop.jpg"
    }


    object Directory {
        val appUpdateDirectory: String =
            "${Environment.getExternalStorageDirectory().absolutePath}/${Common.APP_UPDATE_FILE_DIR_NAME}/${Common.APP_UPDATE_FILE_APK_NAME}"
        val freqOtaUpdateDirectory: String =
            "${Environment.getExternalStorageDirectory().absolutePath}/${Common.OTA_FILE_DIR_NAME}/${Common.OTA_FREQ_128_80_FILE_NAME}"
        val cropDirectory: String = "${Environment.getExternalStorageDirectory().absolutePath}/${Common.CROP_FILE_DIR_NAME}/${Common.CROP_FILE_NAME}"
//          val freqOtaUpdateDirectory: String =
//            "${Environment.getExternalStorageDirectory().absolutePath}/${Common.OTA_FILE_DIR_NAME}/${Common.OTA_FREQ_128_80_FILE_NAME}"
    }

    object Net {
        const val TY_BASE_URL = "http://39.107.79.56:8080/";
        const val OTA_FILE_DOWNLOAD_URL = "ota/watch/firmware/upgrade?productId="
    }

    object Language {
        val LANGUAGE_LIST = listOf(
            Locale(""), Locale("en"), Locale("es"),
//            Locale("ar"),
            Locale("ru"), Locale("ko"), Locale("ja"), Locale("tr"), Locale("de")
        )
    }

    object ProductId {
        const val FREQ_128_80 = "12880"
    }

    object SP {
        const val SP_IS_OTA = "sp_is_ota"

        const val SP_USER_INFO = "sp_user_info"
        const val SP_DEVICE_ADDRESS = "sp_device"
        const val SP_DEVICE_MODEL = "sp_device_model"

        const val SP_SKIN_INDEX = "sp_skin_index"

        const val SP_LANGUAGE_INDEX = "sp_language_index"
    }

    object OTA {
        const val OTA_NONE = 0
        const val OTA_JL = 1
        const val OTA_FREQ = 2
    }

    /**
     * 事件总线
     */
    object LiveDataBus {
        //网络状态
        const val NET_STATE = "NET_STATE"
        const val DEVICE_TO_APP_TASK = "devicesToAppTask"

        //region 权限
        //权限事件申请结果TAG
        const val GET_PERMISSION_RESULT = "GET_PERMISSION_RESULT"

        //权限事件申请结果 成功
        const val GET_PERMISSION_OK = 0

        //权限事件申请结果 失败
        const val GET_PERMISSION_FAILED = 1

        //权限事件索引
        const val PERMISSION_BT_INDEX = 0
        const val PERMISSION_CAMERA_INDEX = 1
        const val PERMISSION_PHONE_INDEX = 2
        const val PERMISSION_NOTIFICATION_INDEX = 3
        const val PERMISSION_LOCATION_INDEX = 4
        //endregion
    }

    /**
     * 设备连接状态
     */
    object BleConnectState {
        const val DISCONNECT = 0
        const val CONNECTING = 1
        const val CONNECTED = 2
        const val NOTIFYING = 3
        const val NOTIFY_SUCCESS = 4
        const val NOTIFY_FAILED = 5
        const val BIND = 99
    }

    object BleUUID {
        val BLE_UUID_SERVICE = UUID.fromString("0000FFE0-E6B7-BBE7-BFBC-E7B2BEE5AF86")
        val BLE_UUID_SERVICE_JL_OTA = BluetoothConstant.UUID_SERVICE

        //    BLE的写特征UUID
        val BLE_UUID_WRITE = UUID.fromString("0000FFE2-E6B7-BBE7-BFBC-E7B2BEE5AF86")
        val BLE_UUID_WRITE_JL_OTA = BluetoothConstant.UUID_WRITE

        //BLE的通知特征UUID
        val BLE_UUID_NOTIFICATION = UUID.fromString("0000FFE1-E6B7-BBE7-BFBC-E7B2BEE5AF86")
        val BLE_UUID_NOTIFICATION_JL_OTA = BluetoothConstant.UUID_NOTIFICATION

        //BLE的通知特征的描述符UUID
        val BLE_UUID_NOTIFICATION_DESCRIPTOR = UUID.fromString("0000FFE1-E6B7-BBE7-BFBC-E7B2BEE5AF86")
        val BLE_UUID_NOTIFICATION_DESCRIPTOR_JL_OTA = UUID.fromString("00002902-0000-1000-8000-00805F9B34FB")

    }


    /**
     * 协议相关
     */
    object ProtocolIndex {
        /**
         * 当前帧数    index:2 length:1
         * 总帧数     index:3 length:1
         * 功能标记    index:4 length:1
         * 校验和      index:5 length:2
         * 数据包长度   index:7 length:2
         * 功能码      index:9 length:2
         * 数据长度    index:11 length:2
         * 数据       index:13 length:n
         */
        const val CURRENT_FRAME_INDEX = 2
        const val CURRENT_FRAME_SIZE = 1
        const val TOTAL_FRAME_INDEX = 3
        const val TOTAL_FRAME_SIZE = 1
        const val FUNCTION_FLAG_INDEX = 4
        const val FUNCTION_FLAG_SIZE = 1
        const val CHECK_SUM_INDEX = 5
        const val CHECK_SUM_SIZE = 2
        const val PACKAGE_LENGTH_INDEX = 7
        const val PACKAGE_LENGTH_SIZE = 2
        const val FUNCTION_ID_INDEX = 9
        const val FUNCTION_ID_SIZE = 2
        const val DATA_LENGTH_INDEX = 11
        const val DATA_LENGTH_SIZE = 2
        const val DATA_INDEX = 13

    }


    /**
     * 基础类消息ID
     */
    object BaseFunctionId {
        /**
         * 握手 0x0001 -> 1
         */
        const val HAND_SHAKE = 1

        /**
         * 芯片信息 0x0002 -> 2
         */
        const val CHIP_INFO = 2

        /**
         * 设备版本号 0x0003 -> 3
         */
        const val DEVICE_VERSION = 3
    }


    /**
     * 绑定类消息ID
     */
    object BondFunctionId {
        /**
         * 绑定 0x0101 -> 257
         */
        const val BIND = 257

        /**
         * 支持的功能列表 0x0102 -> 258
         */
        const val FUNCTION_LIST = 258

        /**
         * 配对请求 0X0103 -> 259
         */
        const val PAIR = 259
    }

    /**
     * 设置类消息ID
     */
    object SettingFunctionId {

        /**
         * 记步目标 0x0201 ->513
         */
        const val STEP_TARGET = 513

        /**
         * 亮屏时间设置 0x0202 -> 514
         */
        const val BRIGHTEN_SCREEN_TIME = 514

        /**
         * 久坐设置 0x0203 ->515
         */
        const val LONG_SIT = 515

        /**
         * 勿扰设置 0x0204 ->516
         */
        const val DO_NOT_DISTURB = 516

        /**
         * 震动设置 0x0205 ->517
         */
        const val SHAKE = 517

        /**
         * 抬手亮屏设置 0x0206 ->518
         */
        const val HAND_BRIGHTEN_SCREEN = 518

        /**
         * 12/24时间类型设置 0x0207 ->519
         */
        const val HOUR_TYPE = 519

        /**
         * 语言设置 0x0208 ->520
         */
        const val LANGUAGE = 520

        /**
         * 闹钟设置 0x0209 ->521
         */
        const val ALARM = 521

        /**
         * 消息通知开关设置 0x020A ->522
         */
        const val NOTIFICATION_SWITCH = 522

        /**
         * 定时心率设置 0x020B ->523
         */
        const val TIME_HEART = 523

        /**
         * 喝水提醒设置 0x020C ->524
         */
        const val DRINK_REMIND = 524

        /**
         * 吃药提醒设置 0x020D ->525
         */
        const val MEDICINE_REMIND = 525

        /**
         * 生理期设置 0x020E ->526
         */
        const val PERIOD = 526

        /**
         * 定时体温设置 0x020F ->527
         */
        const val TIMING_BODY_TEMPERATURE = 527

        /**
         * 防丢设置 0x0210 ->528
         */
        const val ANTI_LOST = 528

        /**
         * 公英制设置 0x0211 ->529
         */
        const val INCH_TYPE = 529

        /**
         * 天气温度单位 0x0212 ->530
        1         */
        const val TEMPERATURE_TYPE = 530

        /**
         * SOS联系人设置 0x0213 ->531
         */
        const val SOS = 531

        /**
         * 手表控制电话 0x0215 ->533
         */
        const val PHONE_CONTROL = 533

        /**
         * 找手机功能 0X0216 ->534
         */
        const val FIND_PHONE = 534

        /**
         * 找手表功能 0X0217 ->535
         */
        const val FIND_WATCH = 535

        /**
         * 拍照控制 0X0218 ->536
         */
        const val CAMERA_CONTROL = 536

        /**
         * 用户信息设置 0X0219 ->537
         */
        const val USER_INFO = 537

    }

    /**
     * 数据类消息ID
     */
    object DataFunctionId {

        /**
         * 实时数据 0x0301 -> 769
         */
        const val REAL_TIME_DATA = 769

        /**
         * 运动 0x0302 -> 770
         */
        const val SPORT_RECORDER = 770

        /**
         * 运动设置 0x0303 -> 771
         */
        const val SPORT_SETTING = 771

        /**
         * 血糖 0x0304 -> 772
         */
        const val BLOOD_GLUCOSE = 772

        /**
         * 心跳 0x0305 -> 773
         */
        const val HEART = 773

        /**
         * 血压 0x0306 -> 774
         */
        const val BLOOD_PRESSURE = 774

        /**
         * 血氧 0x0307 -> 775
         */
        const val BLOOD_OXYGEN = 775

        /**
         * 睡眠 0x0308 -> 776
         */
        const val SLEEP = 776

        /**
         * HRV 0x0309 -> 777
         */
        const val HRV = 777

        /**
         * GPS 0x030A -> 778
         */
        const val GPS = 778

        /**
         * 车辆状态 0x030B -> 779
         */
        const val CAR_STATE = 779

        /**
         * 车辆控制 0x030C -> 780
         */
        const val CAR_CONTROL = 780

        /**
         * 心电数据 0x030D -> 781
         */
        const val ECG = 781

        /**
         * 情绪算法数据 0x030E -> 782
         */
        const val RRI = 782

        /**
         * 大气压 0x030F -> 783
         */
        const val BAROMETRIC_PRESSURE = 783

        /**
         * 体温 0x0310 -> 784
         */
        const val BODY_TEMPERATURE = 784

        /**
         * 车辆坐标范围 0x0311 -> 785
         */
        const val CAR_COORDINATE_RANGE = 785

        /**
         * 跳绳 0x0312 -> 786
         */
        const val JUMP_ROPE = 786

        /**
         * Gsensor 0x0313 -> 787
         */
        const val G_SENSOR = 787


    }


    /**
     * 推送类消息ID
     */
    object PushFunctionId {
        /**
         * 消息推送 0x0401 ->1025
         */
        const val PUSH_MESSAGE = 1025

        /**
         * 音乐控制 0x0402 ->1026
         */
        const val MUSIC_CONTROL = 1026

        /**
         * 天气推送 0x0403 ->1027
         */
        const val WEATHER = 1027

        /**
         * 未来天气推送 0x0404 ->1028
         */
        const val FUTURE_WEATHER = 1028

        /**
         * 时间更新 0x0405 ->1029
         */
        const val TIME_UPDATE = 1029

        /**
         * 来电推送 0x0406 ->1030
         */
        const val PUSH_MESSAGE_PHONE = 1030
    }

    /**
     * 文件传输类ID
     */
    object FileTranslateFunctionId {

        /**
         * 升级表盘 0x0501 ->1281
         */
        const val WATCH_PLATE = 1281

        /**
         * 表盘自定义设置 0x0502 ->1282
         */
        const val CUSTOM_WATCH_PLATE = 1282

        /**
         * 音乐传输 0x0503 ->1283
         */
        const val MUSIC = 1282


    }

    object HomePage {
        val homeFunctionList = mutableListOf<HomeFunctionBean>().apply {
            add(HomeFunctionBean(R.drawable.icon_xueyang, "心率", "-", "bmp", R.color.home_function_heart))
            add(HomeFunctionBean(R.drawable.icon_run, "运动记录", "-", "公里", R.color.home_function_run))
            add(HomeFunctionBean(R.drawable.icon_body_temperature, "体温", "-", "℃", R.color.home_function_body_temperature))
            add(HomeFunctionBean(R.drawable.icon_sleep, "睡眠时间", "-", "", R.color.home_function_sleep))
            add(HomeFunctionBean(R.drawable.icon_xueyang, "血氧", "-", "%", R.color.home_function_xueyang))
            add(HomeFunctionBean(R.drawable.icon_xueya, "血压", "-", "mmHg", R.color.home_function_xueya))
            add(HomeFunctionBean(R.drawable.icon_huxi, "呼吸率", "-", "次/分", R.color.home_function_huxi))
            add(HomeFunctionBean(R.drawable.icon_ecg, "心电图", "-", "窦性心律", R.color.home_function_ecg))
            add(HomeFunctionBean(R.drawable.icon_xuetang, "血糖", "-", "mmol/L", R.color.home_function_xuetang))
        }
    }

    object SportPage {
        val sportItemList = mutableListOf<SportPageItemBean>().apply {
            add(
                SportPageItemBean(
                    0x01,
                    R.drawable.icon_sport_walk_bg,
                    R.drawable.sport_page_sport_item_heart,
                    R.drawable.sport_page_sport_item_cal,
                    "健走",
                    "#00D9A8",
                    "-",
                    "-",
                    "-",
                    "-"
                )
            )
            add(
                SportPageItemBean(
                    0x01,
                    R.drawable.icon_sport_run_bg,
                    R.drawable.sport_page_sport_item_heart,
                    R.drawable.sport_page_sport_item_cal,
                    "跑步",
                    "#FF852B",
                    "-",
                    "-",
                    "-",
                    "-"
                )
            )
        }
    }

    object AboutPage {
        val aboutItemList = mutableListOf<AboutPageBean>().apply {
            add(
                AboutPageBean(0, R.drawable.icon_about_permission, "权限管理")
            )
            add(
                AboutPageBean(1, R.drawable.icon_about_language, "语言选择")
            )
            add(
                AboutPageBean(2, R.drawable.icon_about_theme, "主题切换")
            )
            add(
                AboutPageBean(3, R.drawable.icon_about_about, "关于我们")
            )
            add(
                AboutPageBean(4, R.drawable.icon_about_version, "软件版本")
            )
        }
    }

    object ManualAddDeviceList {
        val deviceList = listOf<ScanDeviceBean>(
            ScanDeviceBean(R.drawable.device_style_watch_c, "智能手表", "蓝牙"),
            ScanDeviceBean(R.drawable.device_style_watch_1_c, "智能手表", "蓝牙"),
            ScanDeviceBean(R.drawable.device_style_xingzhen, "智能手表", "蓝牙"),
            ScanDeviceBean(R.drawable.device_style_student_card, "智能学生卡", "蓝牙"),
            ScanDeviceBean(R.drawable.device_style_jumpline, "智能跳绳", "蓝牙"),
            ScanDeviceBean(R.drawable.device_style_lost_tag, "智能防丢器", "蓝牙")
        )
    }

    /*
    object DataFunctionList {
        val sportFunctionList = mutableListOf<SportItemBean>().apply {
//            add(SportItemBean(0x00, R.drawable.ic_fire, "其他"))
//            add(SportItemBean(0x01, R.drawable.ic_fire, "日常"))
            add(
                SportItemBean(
                    0x02,
                    R.drawable.icon_sport_run,
                    R.drawable.icon_sport_run_gray,
                    R.string.running
                )
            )
            add(
                SportItemBean(
                    0x03,
                    R.drawable.icon_sport_bike,
                    R.drawable.icon_sport_bike_gray,
                    R.string.riding
                )
            )
            add(
                SportItemBean(
                    0x08,
                    R.drawable.icon_sport_tennis,
                    R.drawable.icon_sport_tennis_gray,
                    R.string.tennis
                )
            )
            add(
                SportItemBean(
                    0x09,
                    R.drawable.icon_sport_mount,
                    R.drawable.icon_sport_mount_gray,
                    R.string.climbing
                )
            )
            add(
                SportItemBean(
                    0x0A,
                    R.drawable.icon_sport_step,
                    R.drawable.icon_sport_step_gray,
                    R.string.walking
                )
            )
            add(
                SportItemBean(
                    0x0B,
                    R.drawable.icon_sport_basketball,
                    R.drawable.icon_sport_basketball_gray,
                    R.string.basketball
                )
            )
            add(
                SportItemBean(
                    0x0C,
                    R.drawable.icon_sport_football,
                    R.drawable.icon_sport_football_gray,
                    R.string.soccer
                )
            )
            add(
                SportItemBean(
                    0x14,
                    R.drawable.icon_sport_yoga,
                    R.drawable.icon_sport_yoga_gray,
                    R.string.yoga
                )
            )
            add(
                SportItemBean(
                    0x1A,
                    R.drawable.icon_sport_free,
                    R.drawable.icon_sport_free_gray,
                    R.string.workout
                )
            )
//            add(SportItemBean(0x04, R.drawable.ic_fire, "跳绳"))
//            add(SportItemBean(0x05, R.drawable.ic_fire, "游泳"))
//            add(SportItemBean(0x06, R.drawable.ic_fire, "羽毛球"))
//            add(SportItemBean(0x07, R.drawable.ic_fire, "乒乓球"))
//            add(SportItemBean(0x0D, R.drawable.ic_fire, "棒球"))
//            add(SportItemBean(0x0E, R.drawable.ic_fire, "排球"))
//            add(SportItemBean(0x0F, R.drawable.ic_fire, "板球"))
//            add(SportItemBean(0x10, R.drawable.ic_fire, "橄榄球"))
//            add(SportItemBean(0x11, R.drawable.ic_fire, "曲棍球"))
//            add(SportItemBean(0x12, R.drawable.ic_fire, "跳舞"))
//            add(SportItemBean(0x13, R.drawable.ic_fire, "动感单车"))
//            add(SportItemBean(0x15, R.drawable.ic_fire, "仰卧起坐"))
//            add(SportItemBean(0x16, R.drawable.ic_fire, "跑步机"))
//            add(SportItemBean(0x17, R.drawable.ic_fire, "体操"))
//            add(SportItemBean(0x18, R.drawable.ic_fire, "划船"))
//            add(SportItemBean(0x19, R.drawable.ic_fire, "开合跳"))
//            add(SportItemBean(0x1B, R.drawable.ic_fire, "举重"))
//            add(SportItemBean(0x1C, R.drawable.ic_fire, "攀岩"))
        }


//        val dataFunctionMap = mutableMapOf<Int, SportItemBean>().apply {
//            this[31] =
//                SportItemBean(31, DataFunctionId.HEART, R.drawable.ic_fire, "心率", "", "次/分")
//            this[32] =
//                SportItemBean(
//                    32,
//                    DataFunctionId.BLOOD_PRESSURE,
//                    R.drawable.ic_fire,
//                    "血压",
//                    "",
//                    "mmHg"
//                )
//            this[33] =
//                SportItemBean(33, DataFunctionId.BLOOD_OXYGEN, R.drawable.ic_fire, "血氧", "", "")
//            this[34] = SportItemBean(34, DataFunctionId.HRV, R.drawable.ic_fire, "HRV", "", "")
//            this[35] = SportItemBean(35, DataFunctionId.SLEEP, R.drawable.ic_fire, "睡眠", "", "")
//            this[39] = SportItemBean(39, DataFunctionId.ECG, R.drawable.ic_fire, "心电", "", "")
//            this[40] = SportItemBean(40, DataFunctionId.RRI, R.drawable.ic_fire, "情绪", "", "")
//            this[41] = SportItemBean(
//                41, DataFunctionId.BAROMETRIC_PRESSURE, R.drawable.ic_fire, "大气压", "", ""
//            )
//            this[42] = SportItemBean(
//                42, DataFunctionId.BODY_TEMPERATURE, R.drawable.ic_fire, "体温", "", ""
//            )
//            this[20] = SportItemBean(
//                20, DataFunctionId.BLOOD_GLUCOSE, R.drawable.ic_fire, "血糖", "", "mmol/l"
//            )
//        }
    }

    /**
     * 首页功能列表
     */
    object HomeFunctionList {
        val homeFunctionMap = mutableMapOf<Int, SportItemBean>().apply {


        }
    }

     */


    /**
     * 手表功能列表
     */
    object FunctionItemList {

        /**
         * 设备功能一级列表
         */
        val mainFunctionList = mutableListOf<WatchFunctionBean>().apply {
            this.add(WatchFunctionBean(0, R.drawable.icon_watch_function_setting, "手表设置"))
            this.add(WatchFunctionBean(1, R.drawable.icon_watch_function_health, "健康数据管理"))
            this.add(WatchFunctionBean(2, R.drawable.icon_watch_function_other, "其他功能设置"))
        }


        /**
         * 健康功能列表 1
         */
        val healthList = mutableListOf<WatchFunctionBean>().apply {
            this.add(WatchFunctionBean(0, R.drawable.icon_watch_function_health_step_target, "计步目标"))
            this.add(WatchFunctionBean(2, R.drawable.icon_watch_function_health_heart, "定时心率提醒"))
            this.add(WatchFunctionBean(1, R.drawable.icon_watch_function_health_long_sit, "久坐提醒"))
            this.add(WatchFunctionBean(4, R.drawable.icon_watch_function_health_drink, "喝水提醒"))
            this.add(WatchFunctionBean(5, R.drawable.icon_watch_function_health_medicine, "吃药提醒"))
            this.add(WatchFunctionBean(6, R.drawable.icon_watch_function_health_period, "生理期设置"))
            this.add(WatchFunctionBean(7, R.drawable.icon_watch_function_health_body_tempearture, "定时体温设置"))
        }

        /**
         * 手表功能列表 2
         */
        val watchList = mutableListOf<WatchFunctionBean>().apply {
            this.add(WatchFunctionBean(0, R.drawable.icon_watch_function_setting_watch_table, "表盘切换"))
            this.add(WatchFunctionBean(0, R.drawable.icon_watch_function_setting_bright, "亮屏时间"))
            this.add(WatchFunctionBean(1, R.drawable.icon_watch_function_setting_shark, "震动设置"))
            this.add(WatchFunctionBean(2, R.drawable.icon_watch_function_setting_taiwan, "抬腕亮屏"))
            this.add(WatchFunctionBean(3, R.drawable.icon_watch_function_setting_time_style, "12/24小时设置"))
            this.add(WatchFunctionBean(3, R.drawable.icon_watch_function_setting_language, "语言设置"))
            this.add(WatchFunctionBean(3, R.drawable.icon_watch_function_setting_inch, "公英制设置"))
            this.add(WatchFunctionBean(3, R.drawable.icon_body_temperature, "温度单位设置"))
        }

        /**
         * 其他功能列表 3
         */
        val otherList = mutableListOf<WatchFunctionBean>().apply {
            this.add(WatchFunctionBean(0, R.drawable.icon_watch_function_other_dont_disturb, "勿扰设置"))
            this.add(WatchFunctionBean(1, R.drawable.icon_watch_function_other_notification, "消息通知"))
            this.add(WatchFunctionBean(2, R.drawable.icon_watch_function_other_sos, "SOS设置"))
            this.add(WatchFunctionBean(3, R.drawable.icon_watch_function_other_find_phone, "查找手表"))
            this.add(WatchFunctionBean(3, R.drawable.icon_watch_function_other_alarm, "闹钟设置"))
            this.add(WatchFunctionBean(3, R.drawable.icon_watch_function_other_lost, "防丢设置"))
            this.add(WatchFunctionBean(3, R.drawable.icon_watch_function_other_ota, "OTA升级"))
        }

        val watchDetailDataList = mutableListOf<HomeFunctionBean>().apply {
            add(HomeFunctionBean(R.drawable.icon_xueyang, "心率", "-", "bmp", R.color.home_function_heart))
            add(HomeFunctionBean(R.drawable.icon_run, "运动记录", "-", "公里", R.color.home_function_run))
            add(HomeFunctionBean(R.drawable.icon_xueyang, "血氧", "-", "%", R.color.home_function_xueyang))
            add(HomeFunctionBean(R.drawable.icon_xueya, "血压", "-", "mmHg", R.color.home_function_xueya))
        }
    }
}


/*

val notificationList = listOf(
    NotificationAppBean(0, R.drawable.ic_fire, R.string.phone, true),
    NotificationAppBean(1, R.drawable.ic_fire, R.string.messages, true),
    NotificationAppBean(2, R.drawable.ic_fire, R.string.qq, true),
    NotificationAppBean(3, R.drawable.ic_fire, R.string.we_chat, true),
    NotificationAppBean(4, R.drawable.ic_fire, R.string.weibo, true),
    NotificationAppBean(5, R.drawable.ic_fire, R.string.mailbox, true),
    NotificationAppBean(6, R.drawable.ic_fire, R.string.wechat_work, true),
    NotificationAppBean(7, R.drawable.ic_fire, R.string.Facebook, true),
    NotificationAppBean(8, R.drawable.ic_fire, R.string.WhatsApp, true),
    NotificationAppBean(9, R.drawable.ic_fire, R.string.YouTube, true),
    NotificationAppBean(10, R.drawable.ic_fire, R.string.Skype, true),
    NotificationAppBean(11, R.drawable.ic_fire, R.string.Twitter, true),
    NotificationAppBean(12, R.drawable.ic_fire, R.string.Instagram, true),
    NotificationAppBean(13, R.drawable.ic_fire, R.string.LinkedIn, true),
    NotificationAppBean(14, R.drawable.ic_fire, R.string.NaverCafe, true),
    NotificationAppBean(15, R.drawable.ic_fire, R.string.Between, true),
    NotificationAppBean(16, R.drawable.ic_fire, R.string.KakaoTalk, true),
    NotificationAppBean(17, R.drawable.ic_fire, R.string.Band, true),
    NotificationAppBean(18, R.drawable.ic_fire, R.string.Gmail, true),
    NotificationAppBean(19, R.drawable.ic_fire, R.string.NetFlix, true),
    NotificationAppBean(20, R.drawable.ic_fire, R.string.Telegram, true),
    NotificationAppBean(21, R.drawable.ic_fire, R.string.Line, true),
    NotificationAppBean(22, R.drawable.ic_fire, R.string.mail_163, true),
    NotificationAppBean(23, R.drawable.ic_fire, R.string.hotmail, true),
    NotificationAppBean(24, R.drawable.ic_fire, R.string.outlook, true),
    NotificationAppBean(25, R.drawable.ic_fire, R.string.snapahat, true),
    NotificationAppBean(26, R.drawable.ic_fire, R.string.TOM, true),
    NotificationAppBean(27, R.drawable.ic_fire, R.string.Yahoo, true),
    NotificationAppBean(28, R.drawable.ic_fire, R.string.other, true)
)

// 数据来源：https://www.qimai.cn/
// 国内App 数据来源：https://blog.csdn.net/qq_42351033/article/details/120297096
// 国外App ChatGPT
val notificationIndexMap = mutableMapOf<String, Int>().apply {
    put("com.android.dialer", 0)  // 电话
    put("com.android.mms", 1)  // 短信
    put("com.tencent.mobileqq", 2)  // QQ
    put("com.tencent.mm", 3)    // 微信
    put("com.sina.weibo", 4)  // 微博
    // region 邮箱
    put("com.tencent.androidqqmail", 5)  // QQ邮箱
    // endregion
    put("com.tencent.weworkenterprise", 6)  // 企业微信
    put("com.facebook.katana", 7)  // Facebook
    put("com.whatsapp", 8)  // WhatsApp
    put("com.google.android.youtube", 9)  // YouTube
    put("com.skype.raider", 10) // Skype
    put("com.twitter.android", 11) // Twitter
    put("com.instagram.android", 12) // Instagram
    put("com.linkedin.android", 13) // LinkedIn
    put("com.nhn.android.navercafe", 14) // NaverCafe
    put("kr.co.vcnc.android.couple", 15) // Between
    put("com.kakao.talk", 16) // KakaoTalk
    put("com.nhn.android.band", 17) // Band
    put("com.google.android.gm", 18) // Gmail
    put("com.netflix.mediaclient", 19) // NetFlix
    put("org.telegram.messenge", 20) // Telegram
    put("jp.naver.line.android", 21) // Line
    put("", 22) //163邮箱
    put("", 23) //hotmail
    put("", 24) //outlook
    put("com.snapchat.android", 25) //snapahat
    put("", 26) //TOM
    put("com.yahoo.mobile", 27) //Yahoo
    put("other", 28) //其他
}
}



object ObjectBox {
const val COMMON_DATA_TYPE_SLEEP = 0
const val COMMON_DATA_TYPE_HEART = 1
const val COMMON_DATA_TYPE_BLOOD_OXYGEN = 2
const val STEP_TARGET = 10
}
*/